﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;

namespace JiveMessenger.Utilities
{
    public class TimeoutWebClient : WebClient
    {
        private int _timeout;
        public TimeoutWebClient(int milliseconds)
            : base()
        {
            _timeout = milliseconds;
        }

        protected override WebRequest GetWebRequest(Uri uri)
        {
            WebRequest w = base.GetWebRequest(uri);
            w.Timeout = _timeout;
            return w;
        }
    }
}
